#include "Mesh.h"
#include "Console.h"
CConsole g_Console;
bool CAiMesh::LoadMesh( const std::string& Filename )
{
	// Release the previously loaded mesh (if it exists)
	Clear();

	bool Ret = false;
	Assimp::Importer Importer;

	const aiScene* pScene = Importer.ReadFile(Filename.c_str(), aiProcess_Triangulate | aiProcess_GenSmoothNormals | aiProcess_FlipUVs);

	if (pScene) {
		Ret = InitFromScene(pScene, Filename);
	}
	else {
		CONSOLE("Error parsing '%s': '%s'\n", Filename.c_str(), Importer.GetErrorString());
	}

	return Ret;
}

CAiMesh::CAiMesh( ID3D11Device* pDevice ) : CMesh(pDevice)
{

}

CAiMesh::~CAiMesh()
{

}


CMesh::CMesh( ID3D11Device* pDevice ) : m_pDevice(pDevice), m_pInputLayout(NULL), m_pVertexBuffer(NULL)
{

}
